package cn.ad.server.web.spring.model.dactive;

import cn.ad.server.web.spring.model.AdResponse;
import cn.ad.server.domain.ad.GuidValueObject;

/**
 * active协议请求响应类
 * @author wangwei
 * @from 2016-11-18
 * @since V2.0
 */
public class DactiveAdResponse extends AdResponse {

	/**
	 * 跟踪使用的唯一串号类型 
	 * "唯一串号依序作为后续消息跟踪的依据： 1 - mac 2 - mac1 3 - imei 4 - idfa 5 - duid 6 - androidid 7 - udid 8 - aaid 9 - cookie"
	 */
	private String muniqueType;
	/**
	 * 跟踪使用的唯一串号
	 * Muniquetype对应的ID，便于报告计算UV
	 */
	private String muniqueId;
	/**
	 * 补量渠道id
	 */
	private String fillChannelId;
	
	/**
	 * guid对象
	 */
	private GuidValueObject guidData;
	
    /**
     * 响应结果提示消息
     */
    private String message;

    public DactiveAdResponse(int value) {
		super(value);
	}
    
    public DactiveAdResponse() {
    	super();
    }

	public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

	public String getMuniqueType() {
		return muniqueType;
	}

	public void setMuniqueType(String muniqueType) {
		this.muniqueType = muniqueType;
	}

	public String getMuniqueId() {
		return muniqueId;
	}

	public void setMuniqueId(String muniqueId) {
		this.muniqueId = muniqueId;
	}

	public String getFillChannelId() {
		return fillChannelId;
	}

	public void setFillChannelId(String fillChannelId) {
		this.fillChannelId = fillChannelId;
	}
    
	public AdResponse getAdReponse(){
		AdSimpleResponse  resp = new AdSimpleResponse();
		resp.setStatus(getStatus());
		if(getMessage()==null){
			resp.setMessage("");
		}else{			
			resp.setMessage(getMessage());
		}
		return resp;
	}
	
	public GuidValueObject getGuidData() {
		return guidData;
	}

	public void setGuidData(GuidValueObject guidData) {
		this.guidData = guidData;
	}

	/**
	 * 带有message的response
	 * @author wangwei
	 *
	 */
	public class AdSimpleResponse extends AdResponse{
	    /**
	     * 响应结果提示消息
	     */
	    private String message;
	    
		public String getMessage() {
	        return message;
	    }

	    public void setMessage(String message) {
	        this.message = message;
	    }
	}

  
}
